<?php


namespace App\Admin\Renderable;

use Dcat\Admin\Support\LazyRenderable;
use Dcat\Admin\Widgets\Table;

class ReservationVideo extends LazyRenderable
{

    public function render()
    {
        $dataInfo = $this->payload['video'];

        if($dataInfo){

            $img_html_str = "<video controls='' autoplay='' name='media'>
                <source src='".config('app/url')."/uploads/".$dataInfo."' type='video/mp4'>
                </video>";

            $videoData = [[$img_html_str]];

            return Table::make([], $videoData);
        }else{

            return '';
        }


    }



}